<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>记账表</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css" integrity="sha384-p1KAotb3W9ndluCsqePPYnjRm3c6abdnIjo0tQwYUv83VsbsYd43RuofnFAaDo0E" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-E5Sj1saJVFNzWWK3YIJB4LEDEEVEGaOdfmCprPDkfWUo+xkb6Ep52Q1TMEtgcFwi" crossorigin="anonymous"></script>
</head>
<body>
<table class="table">
    <tbody>
    <tr>
        <th scope="col">ID</th>
        <th scope="col">名称</th>
        <th scope="col">日期</th>
        <th scope="col">数量</th>
        <th scope="col">单价</th>
        <th scope="col">总价</th>
        <th scope="col">实收</th>
        <th scope="col">备注</th>
    </tr>
    @foreach($data as $item)
    <tr>
        <th scope="row">{{$item->id}}</th>
        <td>{{$item->name}}</td>
        <td>{{$item->date}}</td>
        <td>{{$item->num}}</td>
        <td>{{$item->unit_price}}</td>
        <td>{{$item->unit_price * $item->num}}</td>
        <td>{{$item->real_price}}</td>
        <td>{{$item->memo}}</td>
    </tr>
    @endforeach
    </tbody>
</table>
</body>
</html>
<script>
    $(function() {
        alert(123)
    })
</script>